package com.xkcyy.one.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 工具调用日志实体类
 * 
 * @author yuand
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("tool_invoke_log")
public class ToolInvokeLog extends BasicEntity {

    /**
     * 工具ID
     */
    private Long toolId;

    /**
     * 调用智能体ID
     */
    private Long agentId;

    /**
     * 会话ID
     */
    private Long conversationId;

    /**
     * 消息ID
     */
    private Long messageId;

    /**
     * 输入参数
     */
    private String inputParams;

    /**
     * 输出结果
     */
    private String outputResult;

    /**
     * 状态(SUCCESS/FAILED)
     */
    private String status;

    /**
     * 错误信息
     */
    private String errorMessage;

    /**
     * 开始时间
     */
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    private LocalDateTime endTime;

    /**
     * 执行时长(ms)
     */
    private Integer duration;

    /**
     * 状态枚举
     */
    public static class Status {
        /**
         * 成功
         */
        public static final String SUCCESS = "SUCCESS";

        /**
         * 失败
         */
        public static final String FAILED = "FAILED";
    }
}